#include "StdAfx.h"
#include "Data.h"

Order::Order(void)
{
}

Order::~Order(void)
{
}

void saveOrder(Order o){
	ofstream fout(o.orderNo,ios_base::binary);
	fout.write((char *)&o ,sizeof(o));
	fout.close();
}

Order getOrder(const char* no){
	Order o;
	ifstream fin(no,ios_base::binary);
	if(fin){
		fin.read((char *) &o,sizeof(o));
		fin.close();
	}
	else{
		o.step = -1;
	}
	return o;
}
